@import '~antd/es/style/themes/default.less';

@pro-header-hover-bg: rgba(0, 0, 0, 0.025);

.menu {
  :global(.anticon) {
    margin-right: 8px;
  }
  :global(.ant-dropdown-menu-item) {
    min-width: 160px;
  }
}

.right {
  flex: 1;
  height: 100%;
  background: #FFFFFF;
  box-shadow: 2px 2px 4px 0px rgba(0, 0, 0, 0.1);
  margin-left: auto;
  overflow: hidden;
  .action {
    display: inline-block;
    height: 100%;
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.3s;
    color:#fff;
    > i {
      color: @text-color;
      vertical-align: middle;
    }
    &:hover {
      background: @pro-header-hover-bg;
    }
    &:global(.opened) {
      background: @pro-header-hover-bg;
    }
  }
  .search {
    padding: 0 12px;
    &:hover {
      background: transparent;
    }
  }
  .account {
    .avatar {
      margin: ~'calc((@{layout-header-height} - 24px) / 2)' 0;
      margin-right: 8px;
      color: @primary-color;
      vertical-align: top;
      background: rgba(255, 255, 255, 0.85);
    }
  }
  .topmenu{
    display: inline-block;
    height: 100%;
    cursor: pointer;
    transition: all 0.3s;
    > i {
      color: @text-color;
      vertical-align: middle;
    }
    &:hover {
      background: #fff;
    }
    &:global(.opened) {
      background: #fff;
    }
    margin-right: 8px;
    color: #303030;
    vertical-align: top;
    background: rgba(255, 255, 255, 0.85);
  }
}

.dark {
  height: @layout-header-height;
  .action {
    color: rgba(255, 255, 255, 0.85);
    > i {
      color: rgba(255, 255, 255, 0.85);
    }
    &:hover,
    &:global(.opened) {
      background: @primary-color;
    }
  }
}

:global(.ant-pro-global-header) {
  .dark {
    .action {
      color: @text-color;
      > i {
        color: @text-color;
      }
      &:hover {
        color: rgba(255, 255, 255, 0.85);
        > i {
          color: rgba(255, 255, 255, 0.85);
        }
      }
    }
  }
}

@media only screen and (max-width: @screen-md) {
  :global(.ant-divider-vertical) {
    vertical-align: unset;
  }
  .name {
    display: none;
  }
  .right {
    position: absolute;
    top: 0;
    right: 12px;
    .account {
      .avatar {
        margin-right: 0;
        >img{
          width: 32px;
          height: 32px;
        }
      }
    }
  }
}

.headerRight{
  border-left: 1px solid #ddd;
  padding-left: 29px;
}
:global(.ant-avatar) {
  width: 32px;
  height: 32px;
  img{
    width: 32px;
    height: 32px;
  }
}
.name{
  font-size: 14px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #505050;
  line-height: 16px;
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}
.layout{
  margin:0 31px 0 39px;
}